require "./filter.rb"
require 'open-uri' 
require 'rss2.rb'
require './postfile.rb'

url = 'http://www.youku.com/index/rss_category_videos/cateid/100'
#url = 'http://www.youku.com/index/rss_category_videos/cateid/91'
#url = 'http://feed.feedsky.com/newcomic'
#iii = open('a.xml',"r")

iii = open( url )
s = []
s = iii.readlines

if (s.length==0)
	print 'rss read err',s
	return
end

outa = open('a.xml',"w")
outa.print s
iii = open( url)
r = filter iii

if(r=='nothing')
	print 'filter err'
	return
end

rss1 = open 'btemp.xml','w'
rss1.print r

rss1.close

combinrss 'b.xml','btemp.xml'

postfile 'herberthb.hostrator.com','b.xml'


